<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <title>确认订单</title>
    <link rel="stylesheet" type="text/css" href="css/base.css"/>
    <link rel="stylesheet" type="text/css" href="css/confirm.css"/>
    <link rel="stylesheet" type="text/css" href="css/mui.min.css"/>
    <link rel="stylesheet" type="text/css" href="css/loaders.min.css"/>
    <link rel="stylesheet" type="text/css" href="css/loading.css"/>
	<link rel="stylesheet" href="../js/plugins/dialog/dialog.css">
	<script src="js/rem.js"></script> 
    <script src="js/jquery.min.js" type="text/javascript"></script>
	<script src="/js/common.js"></script>
	<script src="/js/plugins/dialog/dialog.min.js"></script>
	<script type="text/javascript">
		sessionStorage.url = "confirm";
		$(window).load(function(){
			$(".loading").addClass("loader-chanage")
			$(".loading").fadeOut(300)
		})
	</script>


</head>
<!--loading页开始-->
<div class="loading">
	<div class="loader">
        <div class="loader-inner pacman">
          <div></div>
          <div></div>
          <div></div>
          <div></div>
          <div></div>
        </div>
	</div>
</div>
<!--loading页结束-->
	<body>
		<!--header star-->
		<header class="mui-bar mui-bar-nav" id="header">
			<a class="btn" href="javascript:history.go(-1)">
	            <i class="iconfont icon-fanhui"></i>
	        </a>
	        <div class="top-sch-box top-sch-boxtwo flex-col">
	                      确认订单
	        </div>
	    </header>
	    <!--header end-->
	    
	    <div class="warp warptwo clearfloat">
	    	<div class="confirm clearfloat">
	    		<div class="add clearfloat box-s">
	    			<a href="address.html">
		    			<div class="left clearfloat fl">
		    				<i class="iconfont icon-dizhi1"></i>
		    			</div>
		    			<div class="middle clearfloat fl">
		    				<p class="tit">
		    					收货人：逍遥老师&nbsp;&nbsp;&nbsp;&nbsp;12580
		    				</p>
		    				<p class="fu-tit over2">
		    					收货地址：加里敦大学6栋666
		    				</p>
		    			</div>
		    			<div class="left clearfloat fr">
		    				<i class="iconfont icon-jiantou1"></i>
		    			</div>
	    			</a>
	    		</div>
	    		<div class="lie clearfloat">
					<a href="detail.html">
						<div class="tu clearfloat fl">
							<img src="images/wnm.png"/>
						</div>
					</a>
					<div class="right clearfloat fl">
						<a href="detail.html">
							<p class="tit over">❤王尼玛温馨提示:</p>
							<p class="tit over">您的商品总共需要的积分为:</p>
						</a>
						<div class="xia clearfloat">
							<a href="detail.html">
								<p class="jifen fl over" id="jifen1">100000积分</p>
							</a>
							<!--<span class="fr db">×1</span>-->
						</div>
					</div>
				</div>
				<div class="gmshu clearfloat box-s fl">
		     	</div>
		     	<div class="gmshu gmshutwo clearfloat box-s fl">
					<div class="gcontent clearfloat">
						<p class="fl">配送方式</p>
			     		<div class="you clearfloat fr">
			     			<span>快递 免邮</span>
			     			<i class="iconfont icon-jiantou1"></i>
			     		</div>
					</div>		     		
		     	</div>
		     	<div class="gmshu gmshutwo clearfloat box-s fl">
					<div class="gcontent clearfloat">
						<p class="fl">发票信息</p>
			     		<div class="you clearfloat fr">
			     			<div class="xuan clearfloat">
			     				<div class="radiotwo" > 
								    <label>
								        <input type="radio" name="fapiao" value="" checked/>
								        <div class="option"></div>
								        <span class="opt-text">需要发票</span>
								    </label>
								</div>
			     			</div>
		    				<div class="xuan clearfloat">
			     				<div class="radiotwo" > 
								    <label>
								        <input type="radio" name="fapiao" value=""/>
								        <div class="option"></div>
								        <span class="opt-text">不需要发票</span>
								    </label>
								</div>
			     			</div>
			     		</div>
					</div>		     		
		     	</div>
		     	<div class="gmshu gmshuthree clearfloat box-s fl">
					<div class="gcontent clearfloat">
						<p class="fl">买家留言</p>
			     		<div class="you clearfloat fl">
			     			<input type="text" name="" id="" value="" class="text" placeholder="选填 对本次交易需求给商家留言" />
			     		</div>
					</div>		     		
		     	</div>

		     	
	    	</div>
	    </div>	    
	    
		<!--settlement star-->
	    <div class="settlement clearfloat">
	    	<div class="zuo clearfloat fl box-s">
	    		  您的总积分：<span id="nin">1</span>
	    	</div>
			<!--zhifu.html-->
	    	<a href="#" class="fl db" id="tijiao">
	    		提交订单
	    	</a>
	    </div>
	    <!--settlement end-->
	    
		<!--footer star-->
	    <footer class="page-footer fixed-footer" id="footer">
			<ul>
				<li>
					<a href="index.html">
						<i class="iconfont icon-shouye"></i>
						<p>首页</p>
					</a>
				</li>
				<li>
					<a href="cation.html">
						<i class="iconfont icon-icon04"></i>
						<p>分类</p>
					</a>
				</li>
				<li class="active">
					<a href="shopcar.html">
						<i class="iconfont icon-gouwuche"></i>
						<p>购物车</p>
					</a>
				</li>
				<li>
					<a href="/game/game.html">
						<i class="iconfont icon-yonghuming"></i>
						<p>商城小游戏</p>
					</a>
				</li>
			</ul>
		</footer>
		<!--footer end-->


	<script>
		$(function () {
            var userId = getUser().id;
            var sum = getParams().count;
            $("#jifen1").html(sum)
            $("#tijiao").click(function () {
				$.get("/shopcars/sum",{userId:userId,sum:sum},function (data) {
					if(data.result){
                        $(document).dialog({
                            autoClose: 1500,
                            titleText: '温馨提示',
                            content: '兑换成功',
                        });

					}
					else {
                        $(document).dialog({
                            autoClose: 1500,
                            titleText: '温馨提示',
                            content: '兑换失败,积分不足',
                        });
					}
                })
				setTimeout(function () {

				location.reload()
                },1511)
            })

			$.get("/signs/integral",{userId:userId,sum:sum},function (data) {
                console.log(data.integral);
                $("#nin").html(data.integral)
            })


        })

	</script>

	</body>
	
</html>
